-- GENERATED SPELL FOR [Sandfury Shadowhunter] --


function spell0_7246(pUnit, Event) --@Dismounting Shot,n/a--
pUnit:FullCastSpellOnTarget(18395,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7246', 2267, 1)
end

function spell1_7246(pUnit, Event) --@Hex,n/a--
pUnit:FullCastSpellOnTarget(11641,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7246', 10318, 1)
end

function spell2_7246(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7246', 564, 1)
end

function Sorts_7246(pUnit, Event)
local choix_sorts_7246 = math.random(0, 2)
if choix_sorts_7246 == 0 then
pUnit:RegisterEvent('spell0_7246', 1, 1)
end
if choix_sorts_7246 == 1 then
pUnit:RegisterEvent('spell1_7246', 1, 1)
end
if choix_sorts_7246 == 2 then
pUnit:RegisterEvent('spell2_7246', 1, 1)
end
end

function mob7246_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7246', math.random(1500, 3000), 1)
end

function mob7246_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7246_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7246_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7246, 1, 'mob7246_Action')
RegisterUnitEvent(7246, 2, 'mob7246_Leave')
RegisterUnitEvent(7246, 3, 'mob7246_Kill')
RegisterUnitEvent(7246, 4, 'mob7246_Die')
